﻿@using Weapsy.Reporting.Apps
@model Weapsy.Reporting.Apps.ModuleTypeAdminModel

@{
    ViewBag.Title = "Create New Module Type";
}

@section scripts{
    @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
    <script src="~/js/admin/moduleTypes/shared.js"></script>
    <script src="~/js/admin/moduleTypes/create.js"></script>
}

<div class="page-header">
    <h1>Create New Module Type</h1>
</div>

<form id="createModuleTypeForm" name="createModuleTypeForm" data-ajax="true" data-ajax-method="POST" data-ajax-url="/Admin/ModuleType/Save" data-ajax-loading="#savingModuleType" data-ajax-success="weapsy.admin.moduleTypes.redirectToIndex" class="form-horizontal validate-form" role="form">
    @await Html.PartialAsync("_ModuleType")
    <div class="form-group">
        <div class="col-md-offset-2 col-md-10">
            <button id="save" type="submit" class="btn btn-primary" title="Save">Save</button>
            <a href="@Url.Action("Index", "ModuleType", new { area = "Admin" })" class="btn btn-default" title="Cancel">Cancel</a>
        </div>
    </div>
    <div class="form-group">
        <div class="col-md-offset-2 col-md-10">
            <span id="savingModuleType" style="display:none;">
                Saving...
            </span>
        </div>
    </div>
</form>